﻿Imports System.Windows.Forms

Public Class frmMediaViewer
    Public mediaList As DBIMedia.DBIMediaPlayer.PlayList

    Public Sub New(ByVal media2Play As DBIMedia.DBIMediaPlayer.PlayList)

        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        mediaList = media2Play

    End Sub

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub frmMediaViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim mediaPlayer As New DBIMedia.DBIMediaPlayer(mediaList)

        Me.ElementHost1.Child = mediaPlayer
        Me.ElementHost1.Child.Visibility = Windows.Visibility.Visible

    End Sub

End Class
